<div class="layui-form" lay-filter="layuiadmin-form" id="layuiadmin-form">
    <div class="layui-form-item">
        <label class="layui-form-label">用户名</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="account" value="{{ d.params.account || '' }}" lay-verify="required"
                       placeholder="请输入..." {{ d.params.account
                       ? 'disabled' : '' }} autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">昵称</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="nickname" value="{{ d.params.nickname || '' }}" lay-verify="required"
                       placeholder="请输入..." autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">权限组</label>
        <div class="layui-input-inline append-group">

        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="password" name="password" placeholder="如未填，则不修改..." autocomplete="off"
                       lay-verify="{{ d.params.nickname ? '' : 'required' }}" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">确认密码</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="password" name="confirmPass" placeholder="确认密码..." autocomplete="off"
                       lay-verify="{{ d.params.nickname ? '' : 'required' }}" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button" lay-submit lay-filter="layuiadmin-submit" value="确认" class="layui-btn">
        </div>
    </div>
</div>

<script>
    layui.use(['admin', 'form', 'helper'], function () {
        var $        = layui.$
            , admin  = layui.admin
            , setter = layui.setter
            , layer  = layui.layer
            , helper = layui.helper
            , form   = layui.form;
        helper.requestRenderSelect('/auth-group/groups' , 'group_id' , '.append-group' , form)
    });
</script>